﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:StoreAppLib.Controls"
    xmlns:animation="using:StoreAppLib.Animations">
    
    <Style TargetType="local:Menu">
        <Setter Property="SeparatorColor" Value="LightGray" />
        <Setter Property="SeparatorThickness" Value="2.0" />
        <Setter Property="Background" Value="White" />
        <Setter Property="Foreground" Value="Black" />
        <Setter Property="FontFamily" Value="Segoe UI Light" />
        <Setter Property="FontSize" Value="15" />
        <Setter Property="BorderBrush" Value="Black" />
        <Setter Property="BorderThickness" Value="2"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="PointerOverBackground" Value="LightGray" />
        <Setter Property="PressedBackground" Value="Gray" />
    </Style>

    <Style x:Key="MenuItemBase" TargetType="local:MenuItem">
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="Padding" Value="10,0,10,0" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="AutomationProperties.ItemType" Value="Menu Item"/>
        <Setter Property="PointerOverBackground" Value="Transparent" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:MenuItem">
                    <Grid Background="{TemplateBinding Background}"
                          HorizontalAlignment="Stretch" 
                          VerticalAlignment="Stretch">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Border x:Name="ItemBackground" 
                                Background="Transparent" 
                                Padding="{TemplateBinding Padding}">
                            <ContentPresenter x:Name="Content"  
                                              animation:TapEffect.Enabled="True"
                                              MinHeight="{TemplateBinding MinHeight}" 
                                              MinWidth="100" />
                        </Border>

                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:MenuItem" BasedOn="{StaticResource MenuItemBase}" />
    <Style TargetType="local:GlobalNavigationMenuItem" BasedOn="{StaticResource MenuItemBase}" />
    
</ResourceDictionary>
